package com.example.xd.myapplication;

import android.Manifest;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.xd.commen.annotation.Privilege;

@Route(path = "/myapplication/MainActivity")
@Privilege(value = {Manifest.permission.WRITE_CALENDAR, Manifest.permission.READ_CALENDAR})

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView tv = findViewById(R.id.main_tv);
        Intent intent = getIntent();
        findViewById(R.id.btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/model_cache/CacheActivity")
                        .withString("text", "mainActivity")
                        .navigation();
            }
        });
    }
}
